package service;



import entity.User;

import java.time.LocalDateTime;
import java.util.List;


// 实现 UserDAO 接口中的方法，创建自定义的 Service 类
public interface UserService {
    /**
     * This is the method to be used to create
     * a record in the User table.
     */
    //插入数据，对用户表来说就是插入姓名和年龄
    public void create(String username, String email, String password_hash, String about_me, LocalDateTime last_seen);
    /**
     * This is the method to be used to list down
     * a record from the User table corresponding
     * to a passed User id.
     */
    // 获取指定 id 的用户
    public User getUser(Integer id);
    /**
     * This is the method to be used to list down
     * all the records from the User table.
     */
    // 获取所有用户信息
    public List<User> listUsers();
    /**
     * This is the method to be used to delete
     * a record from the User table corresponding
     * to a passed User id.
     */
    // 根据用户 id 删除一条记录
    public void delete(Integer id);
    /**
     * This is the method to be used to update
     * a record into the User table.
     */
    // 根据用户 id 更新用户年龄
    public void update(Integer id, String about_me);


}
